#pragma once
#include "stdafx.h"
#include "Operator.h"
#include <boost/shared_ptr.hpp>
#include <boost/noncopyable.hpp>
class Scheduler:private boost::noncopyable
{
private:
	static Scheduler * scheduler;
	Scheduler();
	std::list<boost::shared_ptr<Operator> >operatorList;
	static const int defualtExecutionTimes = 20;
	std::list<boost::shared_ptr<Operator> >::iterator it;
public:
	~Scheduler(void);
	static Scheduler* getInstance();
	void getNextOperatorToExecute(boost::shared_ptr<Operator>& op, int& executionTimes);
	void setOperatorList(std::list<boost::shared_ptr<Operator> >operatorList);
	bool isEmpty(void); // no operator exist
};

